const Layout = () => import("@/layout/index.vue");
const IFrame = () => import("@/layout/frameView.vue");
const AppIFrame = () =>
  import("@/views/qualityInspection/testIframe/index.vue");
export default [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/redirect",
    component: Layout,
    meta: {
      title: "加载中...",
      showLink: false,
      rank: 102
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "Redirect",
        component: () => import("@/layout/redirect.vue")
      }
    ]
  },
  {
    path: "/empty",
    name: "Empty",
    redirect: "/empty/resourceAccess/index",
    component: () => import("@/views/resourceAccess/indexEmpty.vue"),
    meta: {
      title: "全要素资源接入",
      showLink: false
    },
    children: [
      {
        path: "/empty/edgeCloud/collaboration",
        redirect: "/empty/edgeCloud/collaboration/migration",
        meta: {
          title: "协同计算",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/dataProcess/dataPreprocess",
        component: () =>
          import("@/views/resourceAccess/dataProcessing/dataAll.vue"),
        meta: {
          title: "数据合集",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/resourceAccess/index",
        name: "DevConnection",
        component: () =>
          import("@/views/resourceAccess/resourceAccess/DevConnection.vue"),
        meta: {
          title: "资源接入",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/edgeCloud/inference",
        name: "inference",
        component: () =>
          import("@/views/resourceAccess/egdeCloud/inference.vue"),
        meta: {
          title: "云边推理",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/edgeCloud/allocation",
        name: "allocation",
        component: () =>
          import("@/views/resourceAccess/egdeCloud/allocation.vue"),
        meta: {
          title: "算力分配",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/edgeCloud/collaboration/compression",
        name: "compression",
        component: () =>
          import("@/views/resourceAccess/egdeCloud/compression.vue"),
        meta: {
          title: "模型压缩",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/edgeCloud/collaboration/migration",
        name: "migration",
        component: () =>
          import("@/views/resourceAccess/egdeCloud/migration.vue"),
        meta: {
          title: "模型迁移",
          keepAlive: true // 需要缓存
        }
      },
      {
        path: "/empty/edgeCloud/collaboration/optimization",
        name: "optimization",
        component: () =>
          import("@/views/resourceAccess/egdeCloud/optimization.vue"),
        meta: {
          title: "参数优化",
          keepAlive: true // 需要缓存
        }
      },
      {
        name: "dataCleaning",
        path: "/empty/dataProcess/dataPreprocess/dataCleaning",
        component: () =>
          import("@/views/resourceAccess/dataProcessing/dataCleaning.vue"),
        meta: {
          title: "数据清洗",
          keepAlive: true // 需要缓存
        }
      },
      {
        name: "dataDimenRedu",
        path: "/empty/dataProcess/dataPreprocess/dataDimenRedu",
        component: () =>
          import("@/views/resourceAccess/dataProcessing/dataDimenRedu.vue"),
        meta: {
          title: "数据降维",
          keepAlive: true // 需要缓存
        }
      },
      {
        name: "dataFusion",
        path: "/empty/dataProcess/dataPreprocess/dataFusion",
        component: () =>
          import("@/views/resourceAccess/dataProcessing/dataFusion.vue"),
        meta: {
          title: "数据融合",
          keepAlive: true // 需要缓存
        }
      },
      {
        name: "dataEstimation",
        path: "/empty/dataProcess/dataPreprocess/dataEstimation",
        component: () =>
          import("@/views/resourceAccess/dataProcessing/dataEstimation.vue"),
        meta: {
          title: "数据估计",
          keepAlive: true // 需要缓存
        }
      },
      {
        name: "ontologyConstruction",
        path: "/empty/dataProcess/ontologyConstruction",
        component: () =>
          import(
            "@/views/resourceAccess/dataProcessing/ontologyConstruction.vue"
          ),
        meta: {
          title: "数据标准化",
          keepAlive: true // 需要缓存
        }
      },
      {
        name: "ontologyInstantiation",
        path: "/empty/dataProcess/ontologyInstantiation",
        component: () =>
          import(
            "@/views/resourceAccess/dataProcessing/ontologyInstantiation.vue"
          ),
        meta: {
          title: "标识赋码",
          keepAlive: true // 需要缓存
        }
      }
    ]
  },
  {
    path: "/app/qualityInspection",
    name: "QualityInspection",
    redirect: "/app/qualityInspection/home",
    component: () => import("@/views/qualityInspection/index.vue"),
    meta: {
      title: "产品质量检测",
      showLink: false
    },
    children: [
      {
        path: "/app/qualityInspection/home",
        name: "AppHome",
        component: () => import("@/views/qualityInspection/home/index.vue"),
        meta: {
          title: "应用首页",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/dispatchManage",
        name: "AppDispatchManage",
        component: () =>
          import("@/views/qualityInspection/dispatchManage/index.vue"),
        meta: {
          title: "调度管理",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/modelTrain/deploy",
        name: "AppDeploy",
        component: () =>
          import("@/views/qualityInspection/modelTrain/deploy.vue"),
        meta: {
          title: "量化部署",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/modelTrain/modelManage",
        name: "AppModelManage",
        component: () =>
          // 对应组件
          import("@/views/qualityInspection/modelTrain/modelManage.vue"),
        meta: {
          title: "模型管理",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/modelTrain/migration",
        name: "AppMigration",
        component: () =>
          import("@/views/qualityInspection/modelTrain/migration.vue"),
        meta: {
          title: "迁移训练",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/modelTrain/routine",
        name: "AppRoutine",
        component: () =>
          import("@/views/qualityInspection/modelTrain/routine.vue"),
        meta: {
          title: "常规训练",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/resourceAccess/collectSetting",
        name: "AppCollectSetting",
        component: () =>
          import("@/views/qualityInspection/resourceAccess/collectSetting.vue"),
        meta: {
          title: "采集设置",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/resourceAccess/protocolConfig",
        name: "AppProtocolConfig",
        component: () =>
          import(
            "@/views/qualityInspection/resourceAccess/protocolConfig/index.vue"
          ),
        meta: {
          title: "协议配置",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/resourceAccess/resourceAccess",
        name: "AppResourceAccess",
        component: () =>
          import(
            "@/views/qualityInspection/resourceAccess/resourceAccess/DevConnection.vue"
          ),
        meta: {
          title: "资源接入",
          keepAlive: true
        }
      },
      {
        path: "/app/qualityInspection/resourceAccess",
        redirect: "/app/qualityInspection/resourceAccess/resourceAccess"
      },
      {
        path: "/app/qualityInspection/modelTrain",
        redirect: "/app/qualityInspection/modelTrain/routine"
      },
      {
        path: "/app/qualityInspection/dataAssurance",
        redirect: "/app/qualityInspection/dataAssurance/metaFuse"
      },
      {
        path: "/app/qualityInspection/dataAssurance/metaFuse",
        name: "AppMetaFuse",
        // component: import(
        //   "@/views/qualityInspection/dataAssurance/metaFuse.vue"
        // ),
        component: AppIFrame,
        meta: {
          title: "元数据融合",
          keepAlive: true,
          frameSrc: "http://10.8.58.1:30439/datalake/#/no-bar/meta-fuse"
        }
      },
      {
        path: "/app/qualityInspection/dataAssurance/dynamicClean",
        name: "AppDynamicClean",
        // component: import(
        //   "@/views/qualityInspection/dataAssurance/dynamicClean.vue"
        // ),
        component: AppIFrame,
        meta: {
          title: "动态保障",
          keepAlive: true,
          frameSrc: "http://10.8.58.1:30439/datalake/#/no-bar/quality-assurance"
        }
      },
      {
        path: "/app/qualityInspection/dataAssurance/offlineClean",
        name: "AppOfflineClean",
        // component: import("@/views/qualityInspection/dataAssurance/offlineClean.vue"),
        component: AppIFrame,
        meta: {
          title: "数据治理",
          keepAlive: true,
          frameSrc: "http://10.8.58.1:30439/datalake/#/no-bar/bigData"
        }
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
